package com.zqweb.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zqweb.common.to.SkuStockTo;
import com.zqweb.common.to.StockLockTo;
import com.zqweb.common.utils.PageUtils;
import com.zqweb.gulimall.ware.entity.WareSkuEntity;
import com.zqweb.gulimall.ware.to.OrderTo;
import com.zqweb.gulimall.ware.vo.WareLockResultVo;
import com.zqweb.gulimall.ware.vo.WareLockVo;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author zq
 * @email zq@gmail.com
 * @date 2021-11-26 20:28:38
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void addSkuDetail(Long skuId, Long wareId, Integer skuNum);

    List<SkuStockTo> hasStock(Long[] skuIds);

    Boolean lockOrder(WareLockVo wareLockVo);

    void releaseLockStock(StockLockTo stockLockTo);

    void releaseLockStock(OrderTo orderTo);
}

